package com.bigkoo.svprogresshud;

import ohos.agp.animation.AnimatorProperty;

public class SVProgressHUDAnimateUtil {
//    private static final int INVALID = -1;
    static AnimatorProperty getAnimationResource(int gravity, boolean isInAnimation) {
        switch (gravity) {
            case 48:
                return isInAnimation ? intop : outtop;
            case 80:
                return isInAnimation ? inbottom : outbottom;
            case 17:
                return isInAnimation ? incenter : outcenter;
            default:
                 break;
        }
        return null;
    }
    static AnimatorProperty intop = new AnimatorProperty().setDuration(300).moveFromX(0).moveToX(0).moveFromY(-100).moveToY(0);
    static AnimatorProperty outtop = new AnimatorProperty().setDuration(300).moveFromX(0).moveToX(0).moveFromY(0).moveToY(-100);
    static AnimatorProperty inbottom = new AnimatorProperty().setDuration(300).moveFromX(0).moveToX(0).moveFromY(100).moveToY(0);
    static AnimatorProperty outbottom = new AnimatorProperty().setDuration(300).moveFromX(0).moveToX(0).moveFromY(0).moveToY(100);
    static AnimatorProperty incenter = new AnimatorProperty().setDuration(5000).scaleXFrom(120).scaleX(100).scaleYFrom(120).scaleY(100).alphaFrom(0).alpha(1);
    static AnimatorProperty outcenter = new AnimatorProperty().setDuration(300).scaleXFrom(100).scaleX(80).scaleYFrom(100).scaleY(80).alphaFrom(1).alpha(0);
}
